App.Presenter = (function() {

    var _presenters = [];

    var getPresenters = function() {
        return _presenters;
    };

    var register = function(page_id, presenter) {
        _presenters[page_id] = presenter;
    };

    var loadPanel = function(id) {
        var presenter = _presenters[id];
        if (presenter && presenter.onLoad) {
            presenter.onLoad(id);
        }
    };

    return {
        register: register,
        getPresenters: getPresenters,
        loadPanel: loadPanel
    };
})();

